<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html>
<html lang="en">
<c:import url="header.jsp"></c:import>

<body data-id="${match.match_id }">

	<div id="wrapper">

		<c:import url="nav.jsp"></c:import>

		<div id="page-wrapper">
			<div class="container-fluid">
				<div class="row mb-10">

					<h2 class="text-center">获奖结果录入</h2>
					<button class="btn btn-primary col-md-1" id="add_award">增加奖项</button>
					<div class="input-area col-md-6 hide">
						<input type="text" id="award_name">
						<button class="btn btn-primary btn-xs" id="add">确定</button>
						<button class="btn btn-primary btn-xs" id="cancel">取消</button>
					</div>
				</div>


				<div class="row" id="award_container">
					<c:forEach var="prize" items="${prizeList }">
						<div class="panel panel-default">
							<div class="panel-heading">
								<span class="award_title">${prize.prize_name }</span>
								<button class="btn btn-primary btn-xs" data-toggle="modal"
									data-target="#awardModal" id="${prize.prize_id }">录入获奖名单</button>
								<span class="f-right delete">删除</span>
							</div>
							<div class="panel-body">
								<table class="table table-hover table-bordered">
									<thead>
										<tr>
											<th>姓名</th>
											<th>学号</th>
											<th>学校</th>
											<th>学院</th>
											<th>专业</th>
											<th>毕业年份</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<c:forEach var="sign" items="${prize.sign }">
											<tr>
												<td scope="row">${sign.user.trueName }</td>
												<td>${sign.user.studentId}</td>
												<td>${sign.user.academy}</td>
												<td>${sign.user.major}</td>
												<td>${sign.user.university }</td>
												<td>${sign.user.graduate_year}年</td>
												<td class="delete" data-sid="${sign.sign_id }">删除</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
					</c:forEach>
				</div>

			</div>

		</div>
		<!-- /#page-wrapper -->

	</div>
	<div class="modal fade" id="awardModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel" data-origin="">选择获奖名单</h4>
				</div>
				<div class="modal-body">
					<form></form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" id="add_people"
						data-origin="">确定</button>
				</div>
			</div>
		</div>
	</div>
	<c:import url="footer.jsp"></c:import>
	<script src="${ctx }/js/award_result.js"></script>
</body>

</html>